﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Diagnostics.Metrics;
using System.Linq;
using System.Security.Principal;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using VM.Common.EntityEnum;
using VM.Entity.EntityMap.Menu;
using VM.Entity.EntityMap.User;

namespace VM.Entity.EntityDto.Menu
{
    public class getMenuListDto
    {



        #region Model
        private int? _id;
        private string _name;
        private int? _parentid;
        private string _component;
        private string _redirect;
        private string _description;
        /// <summary>
        /// 内码
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, IsOnlyIgnoreInsert = true)]
        public int? id
        {
            set { _id = value; }
            get { return _id; }
        }
        /// <summary>
        /// 单据状态  
        /// </summary>
        [JsonIgnore]
        public int billStatus { get; set; }

        public string billStatusName
        {
            get
            {
                return EnumManager.GetBillStatusRemark(billStatus);
            }
        }

        /// <summary>
        /// 首字母大写，一定要与vue文件export的name对应起来，name名不可重复，用于noKeepAlive缓存控制（该项特别重要）
        /// </summary>
        public string name
        {
            set { _name = value; }
            get { return _name; }
        }

        /// <summary>
        /// 注意根路由（第一条数据）是斜线，第一级路由必须带斜线，第二级路由开始不能带斜线，并且path名不可重复，框架会自动将父级与子级进行拼接，path只能是一个单词切勿配置成`/a/b/c`这种写法
        /// </summary>
        public string path { get; set; }
        /// <summary>
        /// 父路由的id
        /// </summary>
        public int? parentId
        {
            set { _parentid = value; }
            get { return _parentid; }
        }
        /// <summary>
        /// 后端路由时此项为字符串，前端路由时此项为import的function，第一级路由是为Layout，其余为层级为vue的文件路径
        /// </summary>
        public string? component
        {
            set { _component = value; }
            get { return _component; }
        }
        /// <summary>
        /// 重定向到子路由，格式从第一级路由开始拼接（默认可不写）
        /// </summary>
        public string? redirect
        {
            set { _redirect = value; }
            get { return _redirect; }
        }
        /// <summary>
        /// 备注
        /// </summary>
        public string description
        {
            set { _description = value; }
            get { return _description; }
        }
        /// <summary>
        /// 创建人。当前用户内码
        /// </summary>
        public int? createUserId { get; set; }
        /// <summary>
        /// 创建人信息
        /// </summary>
        [Navigate(NavigateType.OneToOne, nameof(createUserId))]
        [SugarColumn(IsOnlyIgnoreInsert = true)]
        [JsonIgnore]
        public sys_user? createUser { get; set; }

        /// <summary>
        /// 创建日期
        /// </summary>
        public DateTime? createDate { get; set; }

        /// <summary>
        /// 最后更新人
        /// </summary>
        public int? updateUserId { get; set; }
        /// <summary>
        /// 创建人信息
        /// </summary>
        [Navigate(NavigateType.OneToOne, nameof(updateUserId))]
        [SugarColumn(IsOnlyIgnoreInsert = true)]
        [JsonIgnore]
        public sys_user? updateUser { get; set; }

        /// <summary>
        /// 最后更新日期
        /// </summary>
        public DateTime? updateDate { get; set; }

        public string sqlTableName { get; set; }
        /// <summary>
        /// 适用的终端，可多选，参照语雀内终端值说明文档
        /// </summary>
        public string menuClinetTypeIds { get; set; }

        [Navigate(NavigateType.OneToOne, nameof(id), nameof(sys_menuMeta.parentId))]
        [SugarColumn(IsOnlyIgnoreInsert = true)]
        public sys_menuMeta? meta { get; set; }

        #endregion Model


    }
}
